<!--
 * @description  : 市管-无证电子烟生产经营企业检查详情
 * @descriptionDetail: 市管-无证电子烟生产经营企业检查详情
 * @copyright    : 浙江烟草
 * @author       : sy
 * @create       : 2023-06-28 15:43:02
-->
<template>
  <view class="page">
    <!-- #ifdef H5-ONLY -->
    <theme-navbar :is-white="false" :title="navTitle" :custom-back="goBack" style="z-index: 99999">
    </theme-navbar>
    <!-- #endif -->  
    <view class="content u-page">
      <view class="u-tabs-box">
        <u-tabs :list="tabList" :active-color="$theme.u_type_primary" :is-scroll="false" :current="currentTab" @change="changeTab"></u-tabs>
      </view>
      <!-- 信息采集 -->
      <view v-show="currentTab == 0">
        <view class="u-p-l-30 u-p-r-30 u-m-t-80 space-bottom">
          <u-form :model="basicForm" :error-type="errorType" label-width="auto" label-position="left" ref="uBasicForm">
            <view style="width: calc(100% + 30px);">
              <form-section title="基础信息"></form-section>
            </view>
            <u-form-item :required="true" label-position="top" label="企业名称" prop="entName">
              <u-input type="text" :disabled="isDisabled" placeholder="请输入" v-model="basicForm.entName" />
            </u-form-item>
            <u-form-item :required="true" label-position="top" label="统一社会信用代码" prop="businessLicNo">
              <u-input type="text" :disabled="isDisabled" placeholder="请输入" v-model="basicForm.businessLicNo" />
            </u-form-item>
            <u-form-item :required="true" label-position="top" label="法定代表人/负责人姓名" prop="managerName">
              <u-input type="text" :disabled="isDisabled" placeholder="请输入" v-model="basicForm.managerName" />
            </u-form-item>
            <u-form-item :required="true" label-position="top" label="身份证号" prop="credNum">
              <u-input type="text" :disabled="isDisabled" placeholder="请输入" v-model="basicForm.credNum" />
            </u-form-item>
            <u-form-item label="企业类型" :required="true" prop="entType">
              <dic-input
                input-align="right"
                :keyWord="$u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_ENT_TYPE"
                :dicCode="basicForm.entType"
                :border="border"
                type="select"
                :disabled="isDisabled"
                :select-open="dicSelectOpen($u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_ENT_TYPE)"
                placeholder="请选择"
                v-model="basicForm.entTypeName"
                @changeInputModelData="(name)=>{$set(basicForm, 'entTypeName', name)}"
                @click="showDic($u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_ENT_TYPE,basicForm.entType)"
              />
            </u-form-item>
            <u-form-item label="所在地区" :required="true" prop="areaName">
              <u-input
                input-align="right"
                type="select"
                :border="border"
                placeholder="请选择"
                v-model="basicForm.areaName"
                @click="nativeNameSelectShow = true"
              />
            </u-form-item>
            <u-form-item label="无证企业来源" :required="true" prop="entSource">
              <dic-input
                input-align="right"
                :keyWord="$u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_SOURCE"
                :dicCode="basicForm.entSource"
                :border="border"
                type="select"
                :select-open="dicSelectOpen($u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_SOURCE)"
                placeholder="请选择"
                :disabled="isDisabled"
                v-model="basicForm.entSourceName"
                @changeInputModelData="(name)=>{$set(basicForm, 'entSourceName', name)}"
                @click="showDic($u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_SOURCE,basicForm.entSource)"
              />
            </u-form-item>
            <u-form-item label="经营状态" :required="true" prop="entStatus">
              <dic-input
                input-align="right"
                :keyWord="$u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_STATUS"
                :dicCode="basicForm.entStatus"
                :border="border"
                type="select"
                :select-open="dicSelectOpen($u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_STATUS)"
                placeholder="请选择"
                :disabled="isDisabled"
                v-model="basicForm.entStatusName"
                @changeInputModelData="(name)=>{$set(basicForm, 'entStatusName', name)}"
                @click="showDic($u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_STATUS,basicForm.entStatus)"
              />
            </u-form-item>
            <view style="margin: 0px -18px;">
              <u-gap :height="$theme.cm_gap_height" :bg-color="$theme.cm_gap_color"></u-gap>
            </view>
            <view style="width: calc(100% + 30px);">
              <form-section title="生产经营信息"></form-section>             
            </view>
            <u-form-item label="业务类型">
              <dic-input
                input-align="right"
                :keyWord="$u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_BUSINESS_TYPE"
                :dicCode="basicForm.businessType"
                :border="border"
                type="select"
                :select-open="dicSelectOpen($u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_BUSINESS_TYPE)"
                placeholder="请选择"
                :disabled="isDisabled"
                v-model="basicForm.businessTypeName"
                @changeInputModelData="(name)=>{$set(basicForm, 'businessTypeName', name)}"
                @click="showDic($u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_BUSINESS_TYPE,basicForm.businessType)"
              />
            </u-form-item>
            <u-form-item label="产品类型">
              <dic-input
                input-align="right"
                :keyWord="$u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_PRODUCT_TYPE"
                :dicCode="basicForm.productType"
                :border="border"
                type="select"
                :select-open="dicMultiSelectOpen($u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_PRODUCT_TYPE)"
                placeholder="请选择"
                :disabled="true"
                v-model="basicForm.productTypeName"
                :needValid="true"
                @changeInputModelData="(name)=>{$set(basicForm, 'productTypeName', name)}"
                @click="showMultiDic($u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_PRODUCT_TYPE,basicForm.productType)"
              />
            </u-form-item>
            <u-form-item label="产品品牌" label-position="top" right-icon="arrow-right">
              <u-input type="textarea" :auto-height="true" :disabled="true" placeholder="请选择" v-model="basicForm.brand" @click="!isDisabled && selectBrand()" />
            </u-form-item>
            <u-form-item label="员工人数">
              <u-input type="number" input-align="right" :disabled="isDisabled" placeholder="请输入" v-model="basicForm.employeeNum" />
            </u-form-item>
            <u-form-item label="参保人数">
              <u-input type="number" input-align="right" :disabled="isDisabled" placeholder="请输入" v-model="basicForm.insuredNum" />
            </u-form-item>
            <u-form-item label="是否以电子烟为主营业务">
              <dic-input
                input-align="right"
                :keyWord="$u.dic.DIC_KEYS.S_SYS_YES_NO"
                :dicCode="basicForm.isMainEcig"
                type="select"
                :border="border"
                :select-open="dicSelectOpen($u.dic.DIC_KEYS.S_SYS_YES_NO)"
                placeholder="请选择"
                v-model="basicForm.isMainEcigName"
                @changeInputModelData="(name)=>{$set(basicForm, 'isMainEcigName', name)}"
                @click="showDic($u.dic.DIC_KEYS.S_SYS_YES_NO,basicForm.isMainEcig)"
              />
            </u-form-item>
            <!-- <u-form-item label="其他业务类型">
              <u-input type="text" input-align="right" :disabled="isDisabled" placeholder="请输入" v-model="basicForm.otherBusinessType" />
            </u-form-item> -->
            <view style="margin: 0px -18px;">
              <u-gap :height="$theme.cm_gap_height" :bg-color="$theme.cm_gap_color"></u-gap>
            </view>
            <view style="width: calc(100% + 30px);">
              <form-section title="地理信息"></form-section>             
            </view>
            <u-form-item label="企业住所" :required="true" label-position="top" prop="entAddress">
              <u-input type="text" :disabled="isDisabled" placeholder="请输入" v-model="basicForm.entAddress" />
            </u-form-item>
            <u-form-item :required="true" label-position="top" label="地图坐标" prop="longLat">
              <u-input type="text" :disabled="true" :border="border" placeholder="请选择" :needValid="true" v-model="basicForm.longLat" />
              <u-icon name="map-fill" :color="$theme.u_type_primary" size="44" @click="setLocation()"></u-icon>
            </u-form-item>
            <u-form-item :border-bottom="false" label-width="auto" label="生产厂址" label-position="left">
              <u-icon
                slot="right"
                name="plus-circle"
                size="40" 
                v-if="!isDisabled"
                :color="$theme.u_type_primary"
                @click="toAddAddress()"
              ></u-icon>
            </u-form-item>
            <view v-for="(itm,index) in productAddrList" :key="index">
              <u-form-item label="" label-position="top">
                <u-input type="text" :disabled="isDisabled" placeholder="请输入" v-model="itm.productAddr" />
                <u-icon name="trash" :color="$theme.u_type_error" size="40" @click="handlerDelete(itm,index)"></u-icon>
              </u-form-item>
            </view>
          </u-form>
          <view style="margin: 0px -18px;">
            <u-gap :height="$theme.cm_gap_height" :bg-color="$theme.cm_gap_color"></u-gap>
          </view>
          <view style="width: calc(100% + 30px);">
            <form-section title="照片信息"></form-section>             
          </view>
          <u-form-item :label="itm.title" :required="itm.isRequired" v-for="itm of imgArr" :key="itm.key" label-position="top">
            <view style="width: 100%;">
              <m-upload
                :fileList="itm.fileList"
                uploadText="选择图片"
                :width="150"
                :height="150"
                :maxCount="itm.max"
                :index="itm.key"
                :multiple="true"
                upApiUrl="uploadBase64ForApp"
                :uploadParam="{
                  fiGroupCode: itm.key,
                  bizId: preParams.entUuid
                }"
                @on-list-change="getImgs"
                :disabled="isDisabled"
                :deletable="!isDisabled"
              >
              </m-upload>
            </view>
          </u-form-item>
          <view class="step-lay1">
            <view class="info-content">
              <view class="info-title">
                <view style="width: calc(100% + 30px);">
                  <form-section title="库存产品"></form-section>
                </view>
                <view>
                  <u-icon name="plus-circle" :color="$theme.u_type_primary" size="48" v-if="!isDisabled" @click="addOrEditInfo('products','add')"></u-icon>
                </view>      
              </view>
            </view>
            <view style="width: 100%;">
              <u-swipe-action
                :show="productItem.show"
                :index="index"
                :options="newOptions"
                :disabled="isDisabled"
                v-for="(productItem,index) in productRegisterList"
                :key="productItem.registerUuid"
                @click="productClick"
                @open="productOpen"
              >
                <view class="step-lay1-content step-lay1-content-border">
                  <view class="step-lay1-content-left " @click="()=>{if(isDisabled) productItmClick(productItem)}">
                    <view>
                      <view style="display: flex;flex-direction: row;">
                        <text>{{ productItem.registerOrgName }}</text>
                        <text class="u-p-l-30">
                          {{ productItem.registrantName }}
                        </text>
                      </view>
                      <view class="step-lay1-content-left-card">
                        {{ productItem.createTime }}
                      </view>
                    </view>
                  </view>
                </view>
              </u-swipe-action>
            </view>
          </view>
          <view class="step-lay1">
            <view class="info-content">
              <view class="info-title">
                <view style="width: calc(100% + 30px);">
                  <form-section title="库存生产物料"></form-section>
                </view>
                <view>
                  <u-icon name="plus-circle" :color="$theme.u_type_primary" size="48" v-if="!isDisabled" @click="addOrEditInfo('materials','add')"></u-icon>
                </view>      
              </view>
            </view>	
            <view style="width: 100%;">
              <u-swipe-action
                :show="materialItem.show"
                :index="index"
                :options="newOptions"
                :disabled="isDisabled"
                v-for="(materialItem,index) in materialRegisterList"
                :key="materialItem.registerUuid"
                @click="materialClick"
                @open="materialOpen"
              >
                <view class="step-lay1-content step-lay1-content-border">
                  <view class="step-lay1-content-left " @click="()=>{if(isDisabled) materialItmClick(materialItem)}">
                    <view>
                      <view style="display: flex;flex-direction: row;">
                        <text>{{ materialItem.registerOrgName }}</text>
                        <text class="u-p-l-30">
                          {{ materialItem.registrantName }}
                        </text>
                      </view>
                      <view class="step-lay1-content-left-card">
                        {{ materialItem.createTime }}
                      </view>
                    </view>
                  </view>
                </view>
              </u-swipe-action>
            </view>
          </view>
          <view class="step-lay1">
            <view class="info-content">
              <view class="info-title">
                <view style="width: calc(100% + 30px);">
                  <form-section title="关联企业"></form-section>
                </view>
                <view>
                  <u-icon name="plus-circle" :color="$theme.u_type_primary" size="48" v-if="!isDisabled" @click="addOrEditInfo('enterprise','add')"></u-icon>
                </view>      
              </view>
            </view>
            <view style="margin-top: 10rpx;">
              <u-swipe-action
                :show="relEntItem.show"
                :index="index"
                :disabled="isDisabled"
                :options="entOptions"
                v-for="(relEntItem,index) in relEntList"
                :key="index"
                @click="relEntClick"
                @open="relEntOpen"
              >
                <view class="step-lay1-content step-lay1-content-border">
                  <view class="step-lay1-content-left ">
                    <view>
                      <view style="display: flex;flex-direction: row;">
                        <text>{{ relEntItem.entName || '' }}</text>
                        <text v-if="relEntItem.areaName">
                          （{{ relEntItem.areaName }}）
                        </text>
                      </view>
                      <view class="step-lay1-content-left-card">
                        {{ relEntItem.managerName }}
                      </view>
                    </view>
                  </view>
                </view>
              </u-swipe-action>
            </view>
          </view>
        </view>
      </view>
      <!-- 检查事项 -->
      <view v-show="currentTab == 1">
        <view class="u-p-l-30 u-p-r-30 u-m-t-80 space-bottom">
          <u-form :model="checkRecordForm" label-width="auto" label-position="top" ref="uForm">
            <view style="width: calc(100% + 30px);">
              <form-section title="经营类型"></form-section>
            </view>
            <u-form-item label="无证生产经营企业类型" :required="true" prop="checkType">
              <dic-input
                :keyWord="$u.dic.DIC_KEYS.M_UNLIC_ECIG_ENT_BUSINESS_TYPE"
                :dicCode="checkRecordForm.checkType"
                :border="border"
                :disabled="isDisabled"
                type="select"
                :select-open="dicSelectOpen($u.dic.DIC_KEYS.M_UNLIC_ECIG_ENT_BUSINESS_TYPE)"
                placeholder="请选择"
                v-model="checkRecordForm.checkTypeName"
                @changeInputModelData="(name)=>{$set(checkRecordForm, 'checkTypeName', name)}"
                @click="showDic($u.dic.DIC_KEYS.M_UNLIC_ECIG_ENT_BUSINESS_TYPE,checkRecordForm.checkType)"
              />
            </u-form-item>
            <view v-for="(item, idx) in checkOpearList" :key="idx">  
              <view>
                <view style="margin: 0px -18px;">
                  <u-gap :height="$theme.cm_gap_height" :bg-color="$theme.cm_gap_color"></u-gap>
                </view>
                <view style="width: calc(100% + 30px);">
                  <form-section :title="item.name"></form-section>
                </view>           
              </view>  
              <view v-for="(item, idt) in item.list" :key="idt">  
                <!-- 开关选择 -->
                <u-cell-item 
                  :arrow="false" 
                  class="cell" 
                >
                  <view slot="title" style="display: inline-flex;flex-direction: row;">
                    <view class="u-cell_title" style="margin-right: 10rpx;">
                      {{ item.itemName }}
                    </view>
                  </view>
                  <u-switch :disabled="isDisabled" slot="right-icon" v-model="checkObj[item.itemUuid]" @change="handlerSwitch($event, item)"></u-switch>
                </u-cell-item>
                <!-- 第二层 -->
                <view v-show="checkObj[item.itemUuid]">
                  <!-- 输入框 -->
                  <!-- textarea大文本 -->
                  <u-field
                    type="textarea"
                    placeholder="请输入"
                    label="问题备注"
                    label-width="120"
                    style="height: 80px;"
                    :disabled="isDisabled"
                    v-model="item.content"
                  >
                  </u-field>
                  <!-- 图片上传 -->
                  <u-card title="图片">
                    <view class="" slot="body">
                      <view class="u-body-item u-flex u-border-bottom u-col-between u-p-t-0">
                        <view class="u-body-item-title u-line-2">
                          <upload-images
                            :url="uploadFile"
                            :length="picMaxCount"
                            :header="header"
                            :bizId="item.checkUuid + '-' +item.itemUuid"
                            :extForm="{fiGroupCode: item.itemUuid,bizId:item.checkUuid + '-' +item.itemUuid,itemUuid: item.itemUuid}"
                            :canDel="!isDisabled"
                            :del-url="delUrl"
                            :can-add="!isDisabled"
                            :renderImages="renderImages"
                            :onSuccess="handlerUploadImg"
                            :ref="'upload' + item.itemUuid"
                          >
                          </upload-images>
                        </view>
                      </view>
                    </view>
                  </u-card>
                </view>
              </view>
            </view>
            <view style="margin: 0px -18px;">
              <u-gap :height="$theme.cm_gap_height" :bg-color="$theme.cm_gap_color"></u-gap>
            </view>
            <view class="info-content">
              <view class="info-title">
                <view style="width: calc(100% + 30px);">
                  <form-section title="涉案记录"></form-section>
                </view>
                <view>
                  <u-icon name="plus-circle" :color="$theme.u_type_primary" size="48" v-if="!isDisabled" @click="addCheckCase()"></u-icon>
                </view>      
              </view>            
            </view> 
            <view style="width: 100%">
              <u-table font-size="26">
                <u-tr class="u-tr border-left">
                  <u-th class="u-th" width="12%">
                    序号
                  </u-th>
                  <u-th width="40%" class="u-th">
                    案件编号
                  </u-th>
                  <u-th class="u-th">
                    案由
                  </u-th>
                </u-tr>
                <u-tr v-if="caseList.length == 0" class="u-tr border-left">
                  <u-td width="100%" class="u-th">
                    ~ 暂无数据 ~
                  </u-td>
                </u-tr>
                <template v-else>
                  <u-tr v-for="(item,index) in caseList" :key="item.caseUuid" class="u-tr border-left" :class="[index == 0 ? 'border-Top' : '']">
                    <u-td class="u-td" width="12%">
                      {{ index+1 }}
                    </u-td>
                    <u-td width="40%" class="u-td">
                      <text class="u-color" @click="itemDetail(item)">
                        {{ item.caseCode }}
                      </text>                            
                    </u-td>
                    <u-td class="u-td">
                      <text class="text-sl u-color" @click="casePropertyDetail(item)">
                        {{ item.caseProperty }}
                      </text>
                    </u-td>
                  </u-tr>
                </template>
              </u-table>
            </view>
          </u-form>
        </view>
      </view>
    </view>
    <dic-choice
      :keyWord="dicKeyWords"
      :currentSelect="dicCurrentSelect"
      v-model="dicShow"
      @confirm="selectDicConfirm"
    ></dic-choice>
    <!-- 行政区划选择 -->
    <u-popup mode="bottom" height="80%" v-model="nativeNameSelectShow">
      <area-select @choose="nativeNameSelectShowComfir"></area-select>
    </u-popup>
    <!-- 多选字典组件 -->
    <u-popup mode="bottom" height="50%" v-model="mulitChoiceShow">
      <dic-multi-choice :keyWord="dicKeyWords" :defaultUids="dicCurrentSelect" @select="multiChoiceConfirm"></dic-multi-choice>
    </u-popup>
    <u-popup mode="bottom" height="30%" v-model="detailShow">
      <view class="content" style="padding: 40rpx;">
        <view style="position: fixed;top: 0;width: 100%;height: 30rpx;background-color: white;"></view>
        <view style="padding-bottom: 120rpx;">
          <u-row gutter="16">
            <u-col span="12">
              <text style="font-size: 30rpx;">
                案由: {{ detailData.caseProperty }}
              </text>
            </u-col>
          </u-row>
        </view>
      </view>
    </u-popup>
    <!-- 检查结果选择 -->
    <u-popup mode="bottom" height="80%" border-radius="16" v-model="checkResultTypeOpen">
      <single-select :extHide="true" :title="'检查结果类型'" :mDatas="checkResultList" :selectedItem="{}" @m-select="checkResultSelected"></single-select>
    </u-popup>
    <view class="submit-btns btn-other-cls" v-if="!isDisabled">
      <!-- 保存检查事项 -->
      <u-button v-if="currentTab == '1'" class="u-btn" type="primary" @click="saveCheckRecord">
        签离
      </u-button>
      <!-- 保存信息采集 -->
      <u-button v-if="currentTab == '0'" class="u-btn" type="primary" @click="saveBasic">
        保存
      </u-button>
    </view>
  </view>
</template>

<script>
import FormSection from "@/components/form-section.vue";
import mUpload from "@/components/m-upload.vue";
import DicChoice from "@/components/dic_choice.vue";
import DicInput from "@/components/dic_input.vue";
import DicMultiChoice from "@/components/dic_multi_choice.vue";
import {SwiperEditAndDel,SwiperView,} from "@/service/case/mapping/index.js";
import areaSelect from "@/components/area-select.vue";
import singleSelect from "@/components/single-select.vue";
import {M_COMMON_CHECK_STATUS,} from "@/service/check/mapping/enum.js";
import UploadImages from "@/components/upload-images.vue";
import {
  CASE_TYPE,
  CASE_SOURCE,
} from "@/service/case/mapping/index.js";
import checkService from "@/service/check/check.service";
import commService from "@/service/common/common.service";
import commonService from '@/service/eCigar/common.service';
export default {
  components:{
    FormSection,
    "dic-choice": DicChoice,
    "dic-input": DicInput,
    mUpload,
    areaSelect,
    DicMultiChoice,
    singleSelect,
    UploadImages,
  },
  data() {
    return {
      CASE_TYPE,
      M_COMMON_CHECK_STATUS,
      SwiperEditAndDel,
      SwiperView,
      errorType: ['border-bottom', 'message',],
      tabList:[{name:"信息采集",},{name:"检查事项",},],// tab栏目
      currentTab:0,	
      checkRecordForm:{},
      border: false,
      dicShow: false, // dic_select 是否显示
      dicKeyWords: "", // dic 关键字
      dicCurrentSelect: "", // dic 当前选择项
      mulitChoiceShow:false,
      isDisabled:false,
      checkOpearList:[
        {
          name:'生产经营情况',
          uuid:'01',
          list: [],
        },
        {
          name:'其他情况',
          uuid:'02',
          list: [],
        },
      ],
      totalOpearList:[],
      checkObj:{},
      picIds:20,
      newOptions:[],
      toRoute:{
        products:'pages/check/undocuEcigarette/inventoryProducts',
        materials:'pages/check/undocuEcigarette/productsMaterials',
        enterprise:'pages/check/undocuEcigarette/relatEnterprise',
      },
      basicForm:{},
      nativeNameSelectShow:false,
      imgArr: [
        {
          key: 'unlic_ecig_ent_site_img',
          title: '场所照片',
          field: 'unlicEcigEntSiteImg',
          change: false,
          fileList: [],
          max: 20,
          isRequired:false,
        },
        {
          key: 'unlic_ecig_ent_equipment_img',
          title: '设备照片',
          field: 'unlicEcigEntEquipmentImg',
          change: false,
          fileList: [],
          max: 20,
          isRequired:false,
        },
        {
          key: 'unlic_ecig_ent_product_img',
          title: '产品照片',
          field: 'unlicEcigEntProductImg',
          change: false,
          fileList: [],
          max: 20,
          isRequired:false,
        },
        {
          key: 'unlic_ecig_ent_other_img',
          title: '其他照片',
          field: 'unlicEcigEntOtherImg',
          change: false,
          fileList: [],
          max: 20,
          isRequired:false,
        },
      ],
      rules: {
        longLat: [{
          required: true,
          trigger: ['blur', 'change',],
          message: '请选择地图坐标',
        },],
        entName: [{
          required: true,
          trigger: ['blur', 'change',],
          message: '请输入企业名称',
        },],
        businessLicNo: [{
          required: true,
          trigger: ['blur', 'change',],
          message: '请输入统一社会信用代码',
        },],
        managerName:[{
          required: true,
          trigger: ['blur', 'change',],
          message: '请输入法定代表人/负责人姓名',
        },],
        entType: [{
          required: true,
          trigger: ['blur', 'change',],
          message: '请选择企业类型',
        },],
        areaName: [{
          required: true,
          trigger: ['blur', 'change',],
          message: '请选择所在地区',
        },],
        entSource:[{
          required: true,
          trigger: ['blur', 'change',],
          message: '请选择无证企业来源',
        },],
        entStatus:[{
          required: true,
          trigger: ['blur', 'change',],
          message: '请选择经营状态',
        },],
        credNum:[
          {
            required: true,
            trigger: ['blur', 'change',],
            message: '请输入身份证号',
          },{
            validator: (rule, value, callback) => {
              if (!this.$u.test.isEmpty(value)) {
                return this.$u.test.idCard(value);
              } else {
                return true;
              }
            },
            message: '请输入正确的证件号码',
            trigger: ['change', 'blur',],
          },],

        entAddress:[{
          required: true,
          trigger: ['blur', 'change',],
          message: '请输入企业住所',
        },],
      },
      ckRules:{
        checkType:[{
          required: true,
          trigger: ['blur', 'change',],
          message: '请选择无证生产经营企业类型',
        },],  
      },
      checkResultTypeOpen:false,
      preParams:{},// 检查列表传过来的参数
      checkResultList:[{uid: CASE_TYPE.SIMPLE, name: '简易案件登记', exts: [],},{uid: CASE_TYPE.NORMAL, name: '普通案件登记', exts: [],},],
      detailData:{},
      detailShow:false,
      caseList:[],
      relEntList:[], // 关联企业list
      productRegisterList:[], // 库存产品list
      materialRegisterList:[], // 库存物料list
      productAddrList:[], // 生产厂址
      entOptions: [
        {
          text: '删除',
          style: {
            backgroundColor: '#dd524d',
          },
        },
      ],
      uploadFile: commonService.uploadFile,
      delUrl: commonService.deleteFile,
      header:{
        tk: uni.getStorageSync("tk"),
      },
      picMaxCount: 5, // 上传图片最大张数
      recordItem: {}, // 当前点击的指标项
      brandList:[],
    }
  },
  onReady() {
    this.$refs.uBasicForm.setRules(this.rules);
    this.$refs.uForm.setRules(this.ckRules);
  },
  onShow() {
    this.getRecordCaseList();
  },
  watch: {
    // 关联企业
    relEntList(newValue) {
      let self = this;
      newValue.filter(item => {
        self.$set(item, 'show', false);
        return true;
      });
    },
    // 库存产品
    productRegisterList(newValue) {
      let self = this;
      newValue.filter(item => {
        self.$set(item, 'show', false);
        return true;
      });
    },
    // 库存物料
    materialRegisterList(newValue) {
      let self = this;
      newValue.filter(item => {
        self.$set(item, 'show', false);
        return true;
      });
    },
  },
  // 加载初始周期方法
  onLoad() {
    this.preParams = this.getRouteParam();
    // console.log(this.preParams);
    this.isDisabled = this.preParams.checkStatus == M_COMMON_CHECK_STATUS.CHECKED ? true : false;
    this.initRecordAndBasic(); 
    // 默认添加一条记录
    this.productAddrList.push({productAddr:'',entUuid:this.preParams.entUuid,});
  },
  mounted() {
    this.getCheckItem();
  },
  methods: {
    getCheckItem(){
      let itemList = this.$store.state.dicts['M_UNLIC_ECIG_ENT_CHECK_ITEM']; 
      // 生产经营、其他情况
      let title = '生产经营情况';
      itemList.forEach((item) => {
        let productCheck = {
          itemUuid: item.bcbCode,
          itemName: item.bcbName,
          content:"",
          fileIds:"",
          ext1:item.ext1,
          checkUuid: this.preParams.checkUuid,
        } 
        this.$set(this.checkObj, item.bcbCode, false);
        this.totalOpearList.push(productCheck);
        this.sepItemList();
      });
    },
    // 获取无证电子烟-检查事项-检查详情；信息采集；涉案记录
    initRecordAndBasic(){   
      // 检查事项详情
      this.getCheckRecordDetail();
      // 信息采集详情
      this.findBasicData();
      // 信息采集-图片
      this.getBasicPhotos();
      // 信息采集-库存产品
      this.getProductList();
      // 信息采集-库存生产物料
      this.getMaterialList()
      // 信息采集-关联企业
      this.relEntData();
      // 涉案记录信息
      this.getRecordCaseList();
    },
    // 检查事项详情接口
    getCheckRecordDetail(){
      this.$modal.showLoading('加载中');
      checkService.getEleCigareCheckRecordDetail({
        checkUuid:this.preParams.checkUuid,
      }).then((rs) => {
        this.$modal.hideLoading();
        if(rs.success){
          this.checkRecordForm = rs.bean ? rs.bean : {isCase:this.caseList.length ? 1 : 0,};
          let itemList = rs.bean.itemList || [];
          if(itemList.length > 0){
            this.totalOpearList.forEach((itm) => {
              itemList.forEach((ck) => {
                if(ck.itemUuid == itm.itemUuid){
                  itm.content = ck.content;
                  itm.fileIds = ck.fileIds;
                  this.$set(this.checkObj, ck.itemUuid, true);
                }
              })
            });  
          }
          this.sepItemList();
          // console.log("checkObj回显",this.checkObj);
        }else{
          this.$u.toast(rs.msg);
        } 
      }).catch((err) => {
        this.$modal.hideLoading();
        this.$u.toast(err); 
      });
    },
    // 将检查项分开
    sepItemList(){
      let productOpearList = this.totalOpearList.filter((item) => {
        return item.ext1 == '01';
      });
      let otherOpearList = this.totalOpearList.filter((item) => {
        return item.ext1 == '02';
      });
      this.checkOpearList[0].list = productOpearList;
      this.checkOpearList[1].list = otherOpearList;
    },
    // 获取检查事项的案件列表
    getRecordCaseList(){
      this.$modal.showLoading('加载中');
      checkService.queryEleCigareRecordCaseList({
        checkUuid:this.preParams.checkUuid,
      }).then((rs) => {
        this.$modal.hideLoading();
        if(rs.success){
          this.caseList = rs.data ? rs.data : [];  
          this.checkRecordForm.isCase = this.caseList.length > 0 ? 1 : 0;
        }else{
          this.$u.toast(rs.msg);
        } 
      }).catch((err) => {
        this.$modal.hideLoading();
        this.$u.toast(err); 
      });
    },
    // 获取信息采集数据
    findBasicData(){
      this.$modal.showLoading('加载中');
      checkService.getUnlicEcigEnt({id:this.preParams.entUuid,}).then((rs) => {
        this.$modal.hideLoading();
        if(rs.success){
          this.basicForm = rs.bean ? rs.bean : {};
          if(this.basicForm.longitude && this.basicForm.latitude){
            this.basicForm.longLat = this.basicForm.longitude + ',' + this.basicForm.latitude;  
          } 
          // 生产厂址
          if(rs.bean.productAddrList.length > 0){
            this.productAddrList = rs.bean.productAddrList;
          }
          // 产品品牌
          this.brandList = rs.bean.brandList;
          let names = [];
          this.brandList.forEach((item) => {
            item.productName && names.push(item.productName);
          });
          this.basicForm.brand = names.join();
        }else{
          this.$u.toast(rs.msg);
        } 
      }).catch((err) => {
        this.$modal.hideLoading();
        this.$u.toast(err); 
      });
    },
    // 获取信息采集-图片
    getBasicPhotos(){
      Promise.all([commService.goFiles(this.preParams.entUuid, 'unlic_ecig_ent_site_img'), commService.goFiles(this.preParams.entUuid, 'unlic_ecig_ent_equipment_img'), commService.goFiles(this.preParams.entUuid, 'unlic_ecig_ent_product_img'),commService.goFiles(this.preParams.entUuid, 'unlic_ecig_ent_other_img'),]).then((dr) => {
        // let [site, equipment,product, other,] = [dr[0].data, dr[1].data, dr[2].data,dr[3].data,];
        for (let i = 0; i < this.imgArr.length; i++) {
          this.imgArr[i].fileList = dr[i].data;
        }
        // console.log(this.imgArr);
      });
    },
    // 信息采集-库存产品
    getProductList(){
      // registerType	登记类型 01库存产品02库存生产物料
      checkService.findUnlicEcigEntStockRegisterList({entUuid:this.preParams.entUuid,registerType:'01',page:1,limit:50,}).then((rs) => {
        if(rs.success){
          this.productRegisterList = rs.data;
          if(this.isDisabled){
            this.newOptions = [];  
          }else{
            this.newOptions = this.SwiperEditAndDel;  
          }      
        }else{
          this.$u.toast(rs.msg);
        } 
      }).catch((err) => {
        this.$u.toast(err); 
      });
    },
    // 信息采集-库存生产物料
    getMaterialList(){
      // registerType	登记类型 01库存产品02库存生产物料
      checkService.findUnlicEcigEntStockRegisterList({entUuid:this.preParams.entUuid,registerType:'02',page:1,limit:50,}).then((rs) => {
        if(rs.success){
          this.materialRegisterList = rs.data;
          if(this.isDisabled){
            this.newOptions = [];  
          }else{
            this.newOptions = this.SwiperEditAndDel;  
          }    
        }else{
          this.$u.toast(rs.msg);
        } 
      }).catch((err) => {
        this.$u.toast(err); 
      });
    },
    // 信息采集-关联企业
    relEntData(){
      checkService.findRelEntList({limit: 20,page: 1,entUuid:this.preParams.entUuid, }).then((rs) => {
        if(rs.success){
          // console.log(rs);
          this.relEntList = rs.data;
        }else{
          this.$u.toast(rs.msg);
        } 
      }).catch((err) => {
        this.$u.toast(err); 
      });
    },
    changeTab(index){
      this.currentTab = index;
    },
    // 添加生产厂址
    toAddAddress(){
      this.productAddrList.push({entUuid: this.preParams.entUuid,
        productAddr: "",});
    },
    // 删除生产厂址
    handlerDelete(itm,index){
      this.productAddrList.splice(index,1);
    },
    // 选择产品品牌
    selectBrand(){
      this.$u.route("/pages/check/undocuEcigarette/brandSelect"); 
    },
    // 字典单选
    dicSelectOpen: function(keyWords) {
      if (this.dicKeyWords == keyWords && this.dicShow) {
        return true;
      }
      return false;
    },
    showDic: function(key, cur, type) {
      if (this.isDisabled) return;
      if (this.dicShow) return;
      this.dicKeyWords = key;
      this.dicCurrentSelect = cur;
      this.dicShow = true;
    },
    selectDicConfirm: function(e) {
      // 类型
      if (this.dicKeyWords == this.$u.dic.DIC_KEYS.IDCARD_TYPE) {
        this.checkRecordForm.entTypeName = e[0].label;
        this.checkRecordForm.entType = e[0].extra.bcbCode;
      } else if(this.dicKeyWords == this.$u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_ENT_TYPE){
        // 企业类型
        this.basicForm.entType = e[0].extra.bcbCode;
        this.basicForm.entTypeName = e[0].label;
      }else if(this.dicKeyWords == this.$u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_SOURCE){
        // 无证企业来源
        this.basicForm.entSource = e[0].extra.bcbCode;
        this.basicForm.entSourceName = e[0].label;
      }else if(this.dicKeyWords == this.$u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_STATUS){
        // 经营状态
        this.basicForm.entStatus = e[0].extra.bcbCode;
        this.basicForm.entStatusName = e[0].label;
      }else if(this.dicKeyWords == this.$u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_BUSINESS_TYPE){
        // 业务类型  
        this.basicForm.businessType = e[0].extra.bcbCode;
        this.basicForm.businessTypeName = e[0].label;
      }else if(this.dicKeyWords == this.$u.dic.DIC_KEYS.S_SYS_YES_NO){
        // 是否以电子烟为主营业务 
        this.basicForm.isMainEcig = e[0].extra.bcbCode;
        this.basicForm.isMainEcigName = e[0].label;
      }else if(this.dicKeyWords == this.$u.dic.DIC_KEYS.M_UNLIC_ECIG_ENT_BUSINESS_TYPE){
        // 无证生产经营企业类型
        this.checkRecordForm.checkType = e[0].extra.bcbCode; 
        this.checkRecordForm.checkTypeName = e[0].label;
      }
    },
    // 字典多选
    dicMultiSelectOpen(type, keyWords){
      if (this.dicKeyWords == keyWords && this.mulitChoiceShow) {
        return true;
      }
      return false;
    },
    showMultiDic(key, cur, type){
      if (this.mulitChoiceShow) return;
      this.dicKeyWords = key;
      this.dicCurrentSelect = cur;
      this.mulitChoiceShow = true;
    },
    multiChoiceConfirm(e){
      this.mulitChoiceShow = false;
      let labels = []; let codes = [];
      e.forEach(itm => {
        labels.push(itm.bcbName);
        codes.push(itm.bcbCode);
      });
      // 产品类型
      if (this.dicKeyWords == this.$u.dic.DIC_KEYS.L_UNLIC_ECIG_ENT_PRODUCT_TYPE) { 
        this.basicForm.productTypeName = labels.join(',');
        this.basicForm.productType = codes.join(',');
      }
    },
    // 库存产品、库存物料、关联企业编辑新增
    addOrEditInfo(flag,type,obj){
      let complaint = {
        type:type,
        entUuid: this.preParams.entUuid,
      };
      if(obj){
        complaint.param = obj;
      }
      this.setRouteParam(complaint);
      this.$u.route(this.toRoute[flag]);
    },
    // 关联企业信息滑动操作
    relEntClick(index, index1) {
      if (index1 === 0) {
        let delEntList = this.relEntList;
        this.$modal.confirm('确定要删除吗?',() => {
          checkService.deleteByIdsEnt([delEntList[index].relUuid,],).then(res => {
            if (res.success) {
              this.relEntData();
            }
          }).catch(err => {
            this.$u.toast(err);
          });
        });
      } 
      this.refreshSwiperRelEnt();
    },
    relEntOpen(index) {
      this.relEntList[index].show = true;
      this.relEntList.map((val, idx) => {
        if (index != idx) this.relEntList[idx].show = false;
      });
    },
    refreshSwiperRelEnt() {
      let self = this;
      this.relEntList = this.relEntList.filter(item => {
        self.$set(item, 'show', false);
        return true;
      });
    },
    // 库存产品信息滑动操作
    productClick(index, index1) {
      if (index1 === 1) {
        let delProList = this.productRegisterList;
        this.$modal.confirm('确定要删除吗?',() => {
          checkService.deleteRegisterById({
            id: delProList[index].registerUuid,
          }).then(res => {
            if (res.success) {
              this.getProductList();
            }
          }).catch(err => {
            this.$u.toast(err);
          });
        });
      } else {
        this.productRegisterList[index].show = false;
        this.addOrEditInfo('products','edit', this.productRegisterList[index]);
      }
      this.refreshSwiperProduct();
    },
    productOpen(index) {
      this.productRegisterList[index].show = true;
      this.productRegisterList.map((val, idx) => {
        if (index != idx) this.productRegisterList[idx].show = false;
      });
    },
    productItmClick(itm){
      this.addOrEditInfo('products','view', itm);
    },
    refreshSwiperProduct() {
      let self = this;
      this.productRegisterList = this.productRegisterList.filter(item => {
        self.$set(item, 'show', false);
        return true;
      });
    },
    // 库存产品信息滑动操作
    materialClick(index, index1) {
      if (index1 === 1) {
        let delMaterialList = this.materialRegisterList;
        this.$modal.confirm('确定要删除吗?',() => {
          checkService.deleteRegisterById({
            id: delMaterialList[index].registerUuid,
          }).then(res => {
            if (res.success) {
              this.getMaterialList();
            }
          }).catch(err => {
            this.$u.toast(err);
          });
        });
      } else {
        this.materialRegisterList[index].show = false;
        this.addOrEditInfo('materials','edit', this.materialRegisterList[index]);
      }
      this.refreshSwiperMaterial();
    },
    materialOpen(index) {
      this.materialRegisterList[index].show = true;
      this.materialRegisterList.map((val, idx) => {
        if (index != idx) this.materialRegisterList[idx].show = false;
      });
    },
    materialItmClick(itm){
      this.addOrEditInfo('materials','view', itm);
    },
    refreshSwiperMaterial() {
      let self = this;
      this.materialRegisterList = this.materialRegisterList.filter(item => {
        self.$set(item, 'show', false);
        return true;
      });
    },
    // 添加、编辑返回操作
    updateBackState(params){
      if(params.pos){
        // 回显经纬度
        // this.basicForm.longLat = `${params.pos.longitude},${params.pos.latitude}`;
        // this.basicForm.longitude = params.pos.longitude;
        // this.basicForm.latitude = params.pos.latitude;
        this.$set( this.basicForm, "longLat", `${params.pos.longitude},${params.pos.latitude}`);
        this.$set( this.basicForm, "longitude", params.pos.longitude);
        this.$set( this.basicForm, "latitude", params.pos.latitude);
      } else if (params['relEnt']) {
        this.relEntData();
        this.refreshSwiperRelEnt();
      }else if(params.formItem && params.formItem.type === 'products'){
        this.getProductList();
        this.refreshSwiperProduct();
      }else if(params.formItem && params.formItem.type === 'materials'){
        this.getMaterialList();
        this.refreshSwiperMaterial();
      }else if(params.brandList){
        this.brandList = [];
        let brandNames = [];
        if(params.brandList.length > 0){
          params.brandList.forEach((item) => {
            let newPro = {
              productUuid:item.productUuid,
              productCode: item.productCode,
              productName: item.productName,
            }
            item.productName && brandNames.push(item.productName);
            this.brandList.push(newPro);
          });       
        }
        this.$set(this.basicForm, "brand", brandNames.join());
        console.log(this.basicForm.brand);
        this.$forceUpdate();
      }
    },
    nativeNameSelectShowComfir(areas) {
      // 只保存区县
      this.basicForm.areaCode = areas[0].countryCode;
      this.basicForm.areaName = [areas[0].countryName,].join("");
      this.nativeNameSelectShow = false;
    },
    // 跳转地理信息页面
    setLocation() {
      this.$u.route('pages/commonPage/modifyLocationMap');
    },
    getImgs(list, index) {
      // 图片暂时保存本地，等表单提交时整体提交
      for (let i = 0; i < this.imgArr.length; i++) {
        if (this.imgArr[i].key == index) {
          this.imgArr[i].fileList = [...list,];
          this.imgArr[i].change = true;
          break;
        }
      }
    },
    // 添加案件
    addCheckCase(){
      this.checkResultTypeOpen = true;
    },
    // 检查结果类型选择事件
    checkResultSelected(e){
      if(e.uid){
        this.checkResultTypeOpen = false;
        this.setRouteParam({
          initQueryData:{},
        });
        this.$u.route({
          url:'/pages/case/components/caseFilingLink',
          type:'to',
          params:{
            caseType: e.uid,
            checkUuid: this.preParams.checkUuid,
            from:"eleCigareCheck",
            caseSource: e.uid == CASE_TYPE.NORMAL ? CASE_SOURCE.marketCheck : '', // 市场查获
            undertaker:this.preParams.executorNames,
            undertakerUuid: this.preParams.executors,
            isSpecialAction: false,
            actionUuid: '',
            actionName: '',
          },
        });  
      }else{
        this.$u.toast("请选择检查结果类型！");
        return;
      }
    },
    // 查看案件详情
    itemDetail(obj){
      this.setRouteParam({
        caseCode: obj.caseCode,
        caseUuid: obj.caseUuid,
        from: "eleCigareCheck", // 主办人
      });
      this.$u.route('/pages/case/offline/caseInfo');
    },
    // 查看案由信息
    casePropertyDetail(obj){
      this.detailData = obj;
      this.detailShow = true;
    },
    // 是否选中
    handlerSwitch(isChecked, rItem) {
      this.recordItem = rItem;
      if (this.isDisabled) {
        return false;
      }
      // console.log("点击后：",this.checkObj);
    },
    // 渲染上传的图片
    renderImages(vm){
      return commonService.findFilesByBizId('', vm.bizId).then(r => {
        r.data.forEach(i => i = this.reInitUploadImg(i));
        return r.data;
      });
    },
    // 监听上传图片变化
    handlerUploadImg(imgList, rsImg, vm) {
      console.log("上传文件变化了", imgList, rsImg, vm);
      let iUrls = [];
      imgList.forEach(m => iUrls.push(m.fileUuid));
      if (!rsImg) {
        this.putImgValue(this.totalOpearList, vm.extForm.itemUuid, iUrls.join(","));
        return imgList;
      }
      imgList.push(this.reInitUploadImg(rsImg));
      iUrls.push(rsImg.fileUuid);
      this.putImgValue(this.totalOpearList, vm.extForm.itemUuid, iUrls.join(","));
      return imgList;
    },
    // 处理已上传的附件路径
    reInitUploadImg(uImg) {
      uImg.src = `${commonService.baseUrl}/commonfile/filestore/downloadFile.do?fileId=${uImg.gfiId}&tk=${uni.getStorageSync("tk")}`;
      uImg.filePath = uImg.src;
      uImg.fileUuid = uImg.gfiId;
      return uImg;
    },
    // 给指标赋值图片地址
    putImgValue(arr, itUuid, imgUrls) {
      arr.forEach(item => {
        if (item.itemUuid == itUuid) {
          item.fileIds = imgUrls;
          return;
        }
      })
    },
    // 保存检查事项
    saveCheckRecord(){ 
      let newlist = [];
      newlist = this.totalOpearList.filter((item) => {
        return this.checkObj[item.itemUuid];
      });
      this.checkRecordForm.itemList = newlist;
      this.$refs.uForm.validate(valid => {
        if (valid) {
          this.$u.loading("正在签离...");
          checkService.saveOrUpDateEleCheckRecord(this.checkRecordForm).then((rs) => {
            this.$u.hideLoading();
            if(rs.success){
              this.$u.toast("签离成功！");
              this.backPrev({
                paramKey: "refresh",
                param : true, 
              });
            }else{
              this.$u.toast(rs.msg);
            }
          }).catch((err) => {
            this.$u.toast(err);
            this.$u.hideLoading();
          }); 
        }
      });
      // console.log(newlist);
      // console.log(this.checkRecordForm);
      // console.log(this.checkObj);
      // console.log(this.totalOpearList);      
    },
    // 保存信息采集信息
    saveBasic(){
      let flag = this.validForm();
      if (flag) {
        // console.log(this.basicForm);
        let newAddList = this.productAddrList.filter((r) => {
          return r.productAddr != '';
        });
        this.basicForm.productAddrList = newAddList;
        this.basicForm.brandList = this.brandList;
        checkService.saveOrUpdateUnlicEcigEnt(this.basicForm).then((rs) => {
          if(rs.success){
            this.$u.toast("保存成功");
          }else{
            this.$u.toast(rs.msg);
          }
        }).catch((err) => {
          this.$u.toast(err); 
        })
      }
    },
    // 表单验证
    validForm() {
      let basicValid = false;
      this.$refs.uBasicForm.validate(valid => {
        if (valid) {
          basicValid = true;         
        } else {
          basicValid = false;
        }
      });
      return basicValid;
    },
  },
}
</script>

<style  lang="scss" scoped>
.page{ 
	padding:0;
 }
.u-tabs-box{
	width: 100%;
	position: fixed;
	z-index: 999;
	/* #ifdef H5-DINGDING || H5-WECHAT */
	top: 0px;
	/* #endif */
	/* #ifdef H5-ONLY  */
	top: 45px;
	/* #endif */
}
.content{
	.info-content{
		padding: 10px 0px 0px;
		.info-title{
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
		}
	}
	.step-lay1 {
		// background-color: #fff;
		// margin: 30rpx 24rpx;
		// border-radius: 15rpx;
		// padding: 30rpx 30rpx;
	
		.step-lay1-content{
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: flex-start;
			margin-top: 30rpx;
			.step-lay1-content-left{
				display: flex;
				flex-direction: row;
				justify-content: flex-start;
				align-items: flex-start;
				view:first-child{
					font-size: .8rem;
					font-weight: 500;
					color: #333333;
					margin-right: 10rpx;
					display: flex;
					flex-direction: column;
					justify-content: flex-start;
				}
				
			}
		}
	}
	.step-lay1-content-left-card{
		font-size: .6rem;
		font-weight: 300 !important;
	} 
	.space-bottom{
		padding-bottom: 100px;
	}
}	
.text-sl{
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  width: 300rpx;
}
.u-color{
	color:$u_type_primary;
}
/deep/ .u-card__head, /deep/ .u-card__body {
  padding: 8px 16px !important;
}
/deep/ .u-cell{
  padding: 14px 0px !important;
}
/deep/ .upload-content{
  padding: 13px 0px !important;
}
</style>
